package cn.stronglink.oil;

import android.app.Application;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import com.tencent.bugly.Bugly;

import cn.stronglink.oil.utils.HttpClientUtils;
import cn.stronglink.oil.utils.SharedPreferencesUtil;

/**
 * Created by chen on 2017/5/8.
 */

public class MyApplication extends Application {
    private static MyApplication INSTANCE = null;
    public static MyApplication getInstance() {
        return INSTANCE;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        INSTANCE = this;
        Bugly.init(getApplicationContext(), "7de5d2d67a", false);
        // 在使用 SDK 各组间之前初始化 context 信息，传入 ApplicationContext
        SDKInitializer.initialize(this);
        //自4.3.0起，百度地图SDK所有接口均支持百度坐标和国测局坐标，用此方法设置您使用的坐标类型.
        //包括BD09LL和GCJ02两种坐标，默认是BD09LL坐标。
        SDKInitializer.setCoordType(CoordType.BD09LL);
        HttpClientUtils.setHOST(SharedPreferencesUtil.getIp(this));
    }
}
